package org.aspectsense.middleware.gui;

import org.aspectsense.middleware.ComponentContainer;

public class ComponentTreeNode implements ITreeNode{

	ComponentContainer cc;
	String type;
	String info;
	public ComponentTreeNode (ComponentContainer componentContainer, String type){
		cc=componentContainer;
		this.type=type;
	}
	public String toString (){
		return cc.getProviderName();
		
	}
	@Override
	public String getType() {
		
		return this.type;
	}
	@Override
	public String getInfo() {
		
		return this.info;
	}
	public void setInfo (String info){
		this.info = info;
	}
	
	public boolean isEndUser ()
	{
		if (cc.getEndUserServices()!=null && cc.getEndUserServices().length>0)
			return true;
		else
			return false;
	}
	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return cc.getBundleName();
	}
}
